import request from '@/utils/request'

// 美工设计需求申请保存草稿
export function graphicApplySaveDraft(data) {
  return request({
    url: '/api/pds/pdsPackingApplyGraphic/saveDraft',
    method: 'post',
    data
  })
}
// 美工设计需求申请提交保存
export function graphicApplySubmit(data) {
  return request({
    url: '/api/pds/pdsPackingApplyGraphic/submitApply',
    method: 'post',
    data
  })
}
// 根据物料号获取物料信息
export function getPdsPackingErpMaterialByNo(params) {
  return request({
    url: '/api/pds/pdsPackingApplyGraphic/getPdsPackingErpMaterialByNo',
    method: 'get',
    params
  })
}
// 查看包才美工设计需求详情
export function getApplyGraphicById(params) {
  return request({
    url: '/api/pds/pdsPackingApplyGraphic/getApplyGraphicById',
    method: 'get',
    params
  })
}
// 删除美工设计申请
export function deleteGraphicApply(data) {
  return request({
    url: '/api/pds/pdsPackingApplyGraphic/deleteGraphicApply',
    method: 'post',
    data
  })
}
// =====================================================
// 保存结构设计申请到草稿
export function saveApplyStructureToDraft(data) {
  return request({
    url: '/api/pds/pdsPackingApplyStructure/saveApplyStructureToDraft',
    method: 'post',
    data
  })
}
// 保存结构设计申请到提交
export function submitApplyStructure(data) {
  return request({
    url: '/api/pds/pdsPackingApplyStructure/submitApplyStructure',
    method: 'post',
    data
  })
}
// 保存结构设计到草稿
export function saveDesignStructureToDraft(data) {
  return request({
    url: '/api/pds/pdsPackingApplyStructure/saveDesignStructureToDraft',
    method: 'post',
    data
  })
}
// 保存结构设计到提交
export function submitDesignStructure(data) {
  return request({
    url: '/api/pds/pdsPackingApplyStructure/submitDesignStructure',
    method: 'post',
    data
  })
}
// 获取结构设计申请详细
export function getApplyStructureDetai(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyStructure/getApplyStructureDetail',
    data
  })
}
// 根据类型选择材质接口 (1=彩盒，2=外箱，3=标贴，4=说明书，5=彩卡, 6=其他)
export function getMaterial(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyGraphic/get-material',
    data
  })
}
// 选择彩盒基础料号接口
export function getCorrugatedNo(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyGraphic/get-corrugated',
    data
  })
}
// 更新包装美工设计数据（保存草稿）
export function updateDesignGrahpicItems(data) {
  return request({
    url: '/api/pds/pdsPackingApplyGraphic/updateDesignGrahpicItems',
    method: 'post',
    data
  })
}
// 包材设计发稿
export function pushGraphicItems(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyGraphic/pushGraphicItems',
    data
  })
}
// 废弃包材料件明细
export function discardGraphicItems(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyGraphic/discardGraphicItems',
    data
  })
}
// 模糊查询机型码
export function getPlmModelNo(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyStructure/getPlmModelNo',
    data
  })
}

// 模糊查询机型码
export function getPlmModelNoByCategoryId(data) {
  return request.post({
    url: '/api/pds/pdsPackingApplyStructure/getPlmModelNoByCategoryId',
    data
  })
}


// 查询型号PPD结构档案
export function getDesignStructurePPD(data) {
  return request.get({
    url: '/api/pds/pdsFileModelPbs/getDesignStructurePPD',
    data
  })
}
// 查询型号PPD美工档案
export function getDesignStructurePPDByArticle(data) {
  return request.get({
    url: '/api/pds/pdsFileArticlePcs/getDesignStructurePPD',
    data
  })
}
// 查询型号PPD美工档案
export function getDesignGraphicPPD(data) {
  return request.get({
    url: '/api/pds/pdsFileArticlePcs/getDesignGraphicPPD',
    data
  })
}